function jg_effect_desaturate(t){var e=!!document.createElement("canvas").getContext;if(e){var i=document.createElement("canvas"),n=i.getContext("2d"),o,r,s,a=0,h,l=new Image;for(l.src=t,i.width=l.width,i.height=l.height,n.drawImage(l,0,0),o=n.getImageData(0,0,i.width,i.height),r=o.data,s=r.length;a=threshold?255:0;r[a]=r[a+1]=r[a+2]=p}return n.putImageData(o,0,0),i.toDataURL()}return t}function jg_effect_blur(t){var e=!!document.createElement("canvas").getContext;if(e){var i=document.createElement("canvas"),n=i.getContext("2d"),o,r,s,a=0,h,l=0,u=0,d=30,c=1;img=new Image,img.src=t,i.width=img.width,i.height=img.height,n.drawImage(img,0,0);var o,p=img.width,f=img.height;o=n.getImageData(l,u,p,f);for(var g=o.data,m,v,y,w,b,x,a,I,S,E,_,C,T,R,z=p-1,j=f-1,k=p*f,O=d+1,L=[],M=[],D=[],A=mul_table[d],H=shg_table[d],W=[],P=[];c-- >0;){for(T=C=0,x=0;xz?z:a)<<2),m+=g[I++],v+=g[I++],y+=g[I++];for(b=0;b0?I<<2:0),S=T+W[b],E=T+P[b],m+=g[S++]-g[E++],v+=g[S++]-g[E++],y+=g[S++]-g[E++],C++;T+=p<<2}for(b=0;bj?0:p,m+=L[_],v+=M[_],y+=D[_];for(C=b<<2,x=0;x>>H,g[C+1]=v*A>>>H,g[C+2]=y*A>>>H,0==b&&(W[x]=((I=x+O)0?I*p:0),S=b+W[x],E=b+P[x],m+=L[S]-L[E],v+=M[S]-M[E],y+=D[S]-D[E],C+=p<<2}}return n.putImageData(o,l,u),i.toDataURL()}return t}function jg_effect_vintage(t){var e={onError:function(){alert("ERROR")}},i={vignette:1,sepia:!0,noise:50,desaturate:.2,lighten:.1};new VintageJS(t,e,i)}function enviraIsMobile(){"use strict";var t=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))||/Android.+Chrome.+[.0-9].+Mobile/i.test(e))&&(t=!0)}(navigator.userAgent||navigator.vendor||window.opera),t}function boxBlurImage(t,e,i,n,o){var r=document.getElementById(t),s=r.naturalWidth,a=r.naturalHeight,h=document.getElementById(e);h.style.width=s+"px",h.style.height=a+"px",h.width=s,h.height=a;var l=h.getContext("2d");l.clearRect(0,0,s,a),l.drawImage(r,0,0),isNaN(i)||i<1||(n?boxBlurCanvasRGBA(e,0,0,s,a,i,o):boxBlurCanvasRGB(e,0,0,s,a,i,o))}function boxBlurCanvasRGBA(t,e,i,n,o,r,s){if(!(isNaN(r)||r<1)){r|=0,isNaN(s)&&(s=1),s|=0,s>3&&(s=3),s<1&&(s=1);var a=document.getElementById(t),h=a.getContext("2d"),l;try{try{l=h.getImageData(e,i,n,o)}catch(t){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),l=h.getImageData(e,i,n,o)}catch(t){throw alert("Cannot access local image"),new Error("unable to access local image data: "+t);return}}}catch(t){throw alert("Cannot access image"),new Error("unable to access image data: "+t);return}for(var u=l.data,d,c,p,f,g,m,v,y,w,b,x,I,S,E,_,C=n-1,T=o-1,R=n*o,z=r+1,j=mul_table[r],k=shg_table[r],O=[],L=[],M=[],D=[],A=[],H=[];s-- >0;){for(S=I=0,m=0;mC?C:v)<<2),d+=u[y++],c+=u[y++],p+=u[y++],f+=u[y];for(g=0;g0?y<<2:0),w=S+A[g],b=S+H[g],d+=u[w++]-u[b++],c+=u[w++]-u[b++],p+=u[w++]-u[b++],f+=u[w]-u[b],I++;S+=n<<2}for(g=0;gT?0:n,d+=O[x],c+=L[x],p+=M[x],f+=D[x];for(I=g<<2,m=0;m>>k,_>0?(_=255/_,u[I]=(d*j>>>k)*_,u[I+1]=(c*j>>>k)*_,u[I+2]=(p*j>>>k)*_):u[I]=u[I+1]=u[I+2]=0,0==g&&(A[m]=((y=m+z)0?y*n:0),w=g+A[m],b=g+H[m],d+=O[w]-O[b],c+=L[w]-L[b],p+=M[w]-M[b],f+=D[w]-D[b],I+=n<<2}}h.putImageData(l,e,i)}}function boxBlurCanvasRGB(t,e,i,n,o,r,s){if(!(isNaN(r)||r<1)){r|=0,isNaN(s)&&(s=1),s|=0,s>3&&(s=3),s<1&&(s=1);var a=t,h=a.getContext("2d"),l;try{try{l=h.getImageData(e,i,n,o)}catch(t){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),l=h.getImageData(e,i,n,o)}catch(t){throw alert("Cannot access local image"),new Error("unable to access local image data: "+t);return}}}catch(t){throw alert("Cannot access image"),new Error("unable to access image data: "+t);return}for(var u=l.data,d,c,p,f,g,m,v,y,w,b,x,I,S,E,_=n-1,C=o-1,T=n*o,R=r+1,z=[],j=[],k=[],O=mul_table[r],L=shg_table[r],M=[],D=[];s-- >0;){for(S=I=0,m=0;m_?_:v)<<2),d+=u[y++],c+=u[y++],p+=u[y++];for(g=0;g0?y<<2:0),w=S+M[g],b=S+D[g],d+=u[w++]-u[b++],c+=u[w++]-u[b++],p+=u[w++]-u[b++],I++;S+=n<<2}for(g=0;gC?0:n,d+=z[x],c+=j[x],p+=k[x];for(I=g<<2,m=0;m>>L,u[I+1]=c*O>>>L,u[I+2]=p*O>>>L,0==g&&(M[m]=((y=m+R)0?y*n:0),w=g+M[m],b=g+D[m],d+=z[w]-z[b],c+=j[w]-j[b],p+=k[w]-k[b],I+=n<<2}}h.putImageData(l,e,i)}}jQuery(document).ready(function($){$("body").on("click",'div.envirabox-title a[href*="#"]:not([href="#"])',function(t){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname)return $.envirabox.close(),!1})}),function($){function t(){return $("body").height()>$(window).height()}var e=function(t,e){this.settings=e,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=e.border>=0?e.border:e.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:$('
'),intervalId:null},this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};e.prototype.getSuffix=function(t,e){var i,n;for(i=t>e?t:e,n=0;n img");return 0===e.length&&(e=t.find("> a > img")),0===e.length?null:e},e.prototype.captionFromEntry=function(t){var e=t.find(".caption");return 0===e.length?null:e},e.prototype.displayEntry=function(t,e,i,n,o,r){t.width(n),t.height(r),t.css("top",i),t.css("left",e);var s=this.imgFromEntry(t);if(null!==s){s.css("width",n),s.css("height",o),s.css("margin-left",-n/2),s.css("margin-top",-o/2);var a=s.attr("src"),h=this.newSrc(a,n,o);s.one("error",function(){s.attr("src",s.data("jg.originalSrc"))});var l=function(){a!==h&&s.attr("src",h)};"skipped"===t.data("jg.loaded")?this.onImageEvent(a,$.proxy(function(){this.showImg(t,l),t.data("jg.loaded",!0)},this)):this.showImg(t,l)}else this.showImg(t);this.displayEntryCaption(t)},e.prototype.displayEntryCaption=function(t){var e=this.imgFromEntry(t);if(null!==e&&this.settings.captions){var i=this.captionFromEntry(t);if(null===i){var n=e.attr("alt");this.isValidCaption(n)||(n=t.attr("title")),this.isValidCaption(n)&&(i=$('
'+n+"
"),t.append(i),t.data("jg.createdCaption",!0))}null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},e.prototype.isValidCaption=function(t){return"undefined"!=typeof t&&t.length>0},e.prototype.onEntryMouseEnterForCaption=function(t){var e=this.captionFromEntry($(t.currentTarget));this.settings.cssAnimation?e.addClass("caption-visible").removeClass("caption-hidden"):e.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},e.prototype.onEntryMouseLeaveForCaption=function(t){var e=this.captionFromEntry($(t.currentTarget));this.settings.cssAnimation?e.removeClass("caption-visible").removeClass("caption-hidden"):e.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},e.prototype.addCaptionEventsHandlers=function(t){var e=t.data("jg.captionMouseEvents");"undefined"==typeof e&&(e={mouseenter:$.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:$.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,e.mouseenter),t.on("mouseleave",void 0,void 0,e.mouseleave),t.data("jg.captionMouseEvents",e))},e.prototype.removeCaptionEventsHandlers=function(t){var e=t.data("jg.captionMouseEvents");"undefined"!=typeof e&&(t.off("mouseenter",void 0,e.mouseenter),t.off("mouseleave",void 0,e.mouseleave),t.removeData("jg.captionMouseEvents"))},e.prototype.prepareBuildingRow=function(t){var e,i,n,o,r,s=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,l=h/this.buildingRow.aspectRatio,u=this.settings.rowHeight,d=this.buildingRow.width/h>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!d){for(e=0;e0&&(u=(this.offY-this.border-this.settings.margins*this.rows)/this.rows,s=u*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),e=0;er)&&(a=r);return this.settings.fixedHeight&&a>this.settings.rowHeight&&(a=this.settings.rowHeight),this.buildingRow.height=a,s},e.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},e.prototype.flushRow=function(t){var e=this.settings,i,n,o=this.border,r;if(n=this.prepareBuildingRow(t),t&&"hide"===e.lastRow&&n===-1)return void this.clearBuildingRow();if(this.maxRowHeight.isPercentage?this.maxRowHeight.value*e.rowHeight0&&this.maxRowHeight.valuethis.settings.refreshSensitivity&&(this.galleryWidth=e,this.rewind(),this.startImgAnalyzer(!0)):(i=t(),this.galleryWidth=e)},this),this.settings.refreshTime)},e.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},e.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},e.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.$gallery.height(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},e.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,e=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.$gallery.height(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase0;e--)i=Math.floor(Math.random()*(e+1)),n=t[e],t[e]=t[i],t[i]=n;return this.insertToGallery(t),t},e.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},e.prototype.resetFilters=function(t){for(var e=0;e=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(i),this.buildingRow.aspectRatio+=o,this.buildingRow.width+=o*this.settings.rowHeight,this.lastAnalyzedIndex=e}else if("error"!==i.data("jg.loaded"))return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.$gallery.trigger(t?"jg.resize":"jg.complete"),this.$gallery.height(this.galleryHeightToSet)},e.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&clearTimeout(this.imgAnalyzerTimeout)},e.prototype.startImgAnalyzer=function(t){var e=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){e.analyzeImages(t)},.001)},e.prototype.onImageEvent=function(t,e,i){if(e||i){var n=new Image,o=$(n);e&&o.one("load",function(){o.off("load error"),e(n)}),i&&o.one("error",function(){o.off("load error"),i(n)}),n.src=t}},e.prototype.init=function(){var t=!1,e=!1,i=this;$.each(this.entries,function(n,o){var r=$(o),s=i.imgFromEntry(r);if(r.addClass("jg-entry"),r.data("jg.loaded")!==!0&&"skipped"!==r.data("jg.loaded"))if(null!==i.settings.rel&&r.attr("rel",i.settings.rel),null!==i.settings.target&&r.attr("target",i.settings.target),null!==s){var a=i.extractImgSrcFromImage(s);if(s.attr("src",a),i.settings.waitThumbnailsLoad===!1){var h=parseFloat(s.attr("width")),l=parseFloat(s.attr("height"));if(!isNaN(h)&&!isNaN(l))return r.data("jg.width",h),r.data("jg.height",l),r.data("jg.loaded","skipped"),e=!0,i.startImgAnalyzer(!1),!0}r.data("jg.loaded",!1),t=!0,i.isSpinnerActive()||i.startLoadingSpinnerAnimation(),i.onImageEvent(a,function(t){r.data("jg.width",t.width),r.data("jg.height",t.height),r.data("jg.loaded",!0),i.startImgAnalyzer(!1)},function(){r.data("jg.loaded","error"),i.startImgAnalyzer(!1)})}else r.data("jg.loaded",!0),r.data("jg.width",r.width()|parseFloat(r.css("width"))|1),r.data("jg.height",r.height()|parseFloat(r.css("height"))|1)}),t||e||this.startImgAnalyzer(!1),this.checkWidth()},e.prototype.checkOrConvertNumber=function(t,e){if("string"===$.type(t[e])&&(t[e]=parseFloat(t[e])),"number"!==$.type(t[e]))throw e+" must be a number";if(isNaN(t[e]))throw"invalid number for "+e},e.prototype.checkSizeRangesSuffixes=function(){if("object"!==$.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t=[];for(var e in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(e)&&t.push(e);for(var i={0:""},n=0;n0&&t.value1)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==$.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==$.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if("boolean"!==$.type(this.settings.fixedHeight))throw"fixedHeight must be a boolean";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==$.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==$.type(this.settings.selector))throw"selector must be a string";if(this.settings.sort!==!1&&!$.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(this.settings.filter!==!1&&!$.isFunction(this.settings.filter)&&"string"!==$.type(this.settings.filter))throw"filter must be false, a string or a filter function"},e.prototype.retrieveSuffixRanges=function(){var t=[];for(var e in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(e)&&t.push(parseInt(e,10));return t.sort(function(t,e){return t>e?1:t=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},$.fn.justifiedGallery=function(t){return this.each(function(i,n){var o=$(n);o.addClass("envira-justified-gallery");var r=o.data("jg.controller");if("undefined"==typeof r){if("undefined"!=typeof t&&null!==t&&"object"!==$.type(t)){if("destroy"===t)return;throw"The argument must be an object"}r=new e(o,$.extend({},$.fn.justifiedGallery.defaults,t)),o.data("jg.controller",r)}else if("norewind"===t);else{if("destroy"===t)return void r.destroy();r.updateSettings(t),r.rewind()}r.updateEntries("norewind"===t)&&r.init()})},$.fn.justifiedGallery.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:-1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,fixedHeight:!1,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!1,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,sort:!1,filter:!1,selector:"> a, > div:not(.spinner)"}}(jQuery),function($){var t=$.fn.justifiedGallery,e={};$.fn.enviraJustifiedGallery=function(){var i=t.apply(this,arguments);if(e=i.data("jg.controller"),void 0!==e)return e.displayEntryCaption=function(t){var e=this.imgFromEntry(t);if(null!==e&&this.settings.captions){var i=this.captionFromEntry(t);if(null===i){var n=e.data("envira-caption");this.isValidCaption(n)&&(i=$('
'+n+"
"),e.after(i),t.data("jg.createdCaption",!0))}if(null!==i){this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity);var o=i.css("height");t.find(".envira-gallery-position-overlay.envira-gallery-bottom-left").css("bottom",o),t.find(".envira-gallery-position-overlay.envira-gallery-bottom-right").css("bottom",o),this.addCaptionEventsHandlers(t)}}else this.removeCaptionEventsHandlers(t)},e}}(jQuery), !function(t,e){"function"==typeof define&&define.amd?define("vintagejs",["jquery"],function(i){return t.VintageJS=e(i)}):"object"==typeof exports?module.exports=e(require("jquery")):t.VintageJS=e(jQuery)}(this,function(t){var e=function(t,e,i){if(0==t instanceof HTMLImageElement)throw"The element (1st parameter) must be an instance of HTMLImageElement";var n,o,r,s,a,h,l,u,d,c=new Image,p=new Image,f=document.createElement("canvas"),g=f.getContext("2d"),m={onStart:function(){},onStop:function(){},onError:function(){},mime:"image/jpeg"},v={curves:!1,screen:!1,desaturate:!1,vignette:!1,lighten:!1,noise:!1,viewFinder:!1,sepia:!1,brightness:!1,contrast:!1};c.onerror=m.onError,c.onload=function(){h=f.width=c.width,l=f.height=c.height,n()},p.onerror=m.onError,p.onload=function(){g.clearRect(0,0,h,l),g.drawImage(p,0,0,h,l),(window.vjsImageCache||(window.vjsImageCache={}))[d]=g.getImageData(0,0,h,l).data,n()},o=function(t){m.onStart(),u={};for(var e in v)u[e]=t[e]||v[e];s=[],u.viewFinder&&s.push(u.viewFinder),c.src==a?n():c.src=a},n=function(){if(0===s.length)return r();var t=s.pop();return d=[h,l,t].join("-"),window.vjsImageCache&&window.vjsImageCache[d]?n():void(p.src=t)},r=function(){var e,i,n;g.clearRect(0,0,h,l),g.drawImage(c,0,0,h,l),(u.vignette||u.lighten)&&(e=Math.sqrt(Math.pow(h/2,2)+Math.pow(l/2,2))),u.vignette&&(g.globalCompositeOperation="source-over",i=g.createRadialGradient(h/2,l/2,0,h/2,l/2,e),i.addColorStop(0,"rgba(0,0,0,0)"),i.addColorStop(.5,"rgba(0,0,0,0)"),i.addColorStop(1,["rgba(0,0,0,",u.vignette,")"].join("")),g.fillStyle=i,g.fillRect(0,0,h,l)),u.lighten&&(g.globalCompositeOperation="lighter",i=g.createRadialGradient(h/2,l/2,0,h/2,l/2,e),i.addColorStop(0,["rgba(255,255,255,",u.lighten,")"].join("")),i.addColorStop(.5,"rgba(255,255,255,0)"),i.addColorStop(1,"rgba(0,0,0,0)"),g.fillStyle=i,g.fillRect(0,0,h,l)),n=g.getImageData(0,0,h,l);var o,r,s,a,d,p,f,v,y,w=n.data;u.contrast&&(y=259*(u.contrast+255)/(255*(259-u.contrast))),u.viewFinder&&(v=window.vjsImageCache[[h,l,u.viewFinder].join("-")]);for(var b=h*l;b>=0;--b)for(o=b<<2,u.curves&&(w[o]=u.curves.r[w[o]],w[o+1]=u.curves.g[w[o+1]],w[o+2]=u.curves.b[w[o+2]]),u.contrast&&(w[o]=y*(w[o]-128)+128,w[o+1]=y*(w[o+1]-128)+128,w[o+2]=y*(w[o+2]-128)+128),u.brightness&&(w[o]+=u.brightness,w[o+1]+=u.brightness,w[o+2]+=u.brightness),u.screen&&(w[o]=255-(255-w[o])*(255-u.screen.r*u.screen.a)/255,w[o+1]=255-(255-w[o+1])*(255-u.screen.g*u.screen.a)/255,w[o+2]=255-(255-w[o+2])*(255-u.screen.b*u.screen.a)/255),u.noise&&(f=u.noise-Math.random()*u.noise/2,w[o]+=f,w[o+1]+=f,w[o+2]+=f),u.viewFinder&&(w[o]=w[o]*v[o]/255,w[o+1]=w[o+1]*v[o+1]/255,w[o+2]=w[o+2]*v[o+2]/255),u.sepia&&(s=w[o],a=w[o+1],d=w[o+2],w[o]=.393*s+.769*a+.189*d,w[o+1]=.349*s+.686*a+.168*d,w[o+2]=.272*s+.534*a+.131*d),u.desaturate&&(p=(w[o]+w[o+1]+w[o+2])/3,w[o]+=(p-w[o])*u.desaturate,w[o+1]+=(p-w[o+1])*u.desaturate,w[o+2]+=(p-w[o+2])*u.desaturate),r=2;r>=0;--r)w[o+r]=~~(w[o+r]>255?255:w[o+r]<0?0:w[o+r]);g.putImageData(n,0,0),t.src=g.canvas.toDataURL(m.mime),m.onStop()},a=t.src,e=e||{};for(var y in m)m[y]=e[y]||m[y];return i&&o(i),{apply:function(){a=t.src},reset:function(){t.src=a},vintage:o}};return t.fn.vintage=function(i,n){return this.each(function(){t.data(this,"vintageJS")||t.data(this,"vintageJS",new e(this,i,n))})},e});var mul_table=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],shg_table=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];jQuery(document).ready(function($){var t="ontouchstart"in document.documentElement;t&&$("body").addClass("envira-touch")}),function(t){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}(function($){"use strict";function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=h),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=$.extend({},$.fn.swipe.defaults,t),this.each(function(){var i=$(this),n=i.data(T);n||(n=new e(this,t),i.data(T,n))})}function e(t,e){function g(t){if(!(lt()||$(t.target).closest(e.excludedElements,$t).length>0)){var i=t.originalEvent?t.originalEvent:t,n,o=E?i.touches[0]:i;return Vt=b,E?Ut=i.touches.length:t.preventDefault(),Dt=0,At=null,qt=null,Ht=0,Wt=0,Pt=0,Bt=1,Ft=0,Yt=ft(),Nt=vt(),at(),!E||Ut===e.fingers||e.fingers===y||q()?(dt(0,o),Qt=Ct(),2==Ut&&(dt(1,i.touches[1]),Wt=Pt=bt(Yt[0].start,Yt[1].start)),(e.swipeStatus||e.pinchStatus)&&(n=M(i,Vt))):n=!1,n===!1?(Vt=S,M(i,Vt),n):(e.hold&&(te=setTimeout($.proxy(function(){$t.trigger("hold",[i.target]),e.hold&&(n=e.hold.call($t,i,i.target))},this),e.longTapThreshold)),ut(!0),null)}}function R(t){var i=t.originalEvent?t.originalEvent:t;if(Vt!==I&&Vt!==S&&!ht()){var n,o=E?i.touches[0]:i,r=ct(o);if(Gt=Ct(),E&&(Ut=i.touches.length),e.hold&&clearTimeout(te),Vt=x,2==Ut&&(0==Wt?(dt(1,i.touches[1]),Wt=Pt=bt(Yt[0].start,Yt[1].start)):(ct(i.touches[1]),Pt=bt(Yt[0].end,Yt[1].end),qt=It(Yt[0].end,Yt[1].end)),Bt=xt(Wt,Pt),Ft=Math.abs(Wt-Pt)),Ut===e.fingers||e.fingers===y||!E||q()){if(At=_t(r.start,r.end),B(t,At),Dt=St(r.start,r.end),Ht=wt(),gt(At,Dt),(e.swipeStatus||e.pinchStatus)&&(n=M(i,Vt)),!e.triggerOnTouchEnd||e.triggerOnTouchLeave){var s=!0;if(e.triggerOnTouchLeave){var a=Tt(this);s=Rt(r.end,a)}!e.triggerOnTouchEnd&&s?Vt=L(x):e.triggerOnTouchLeave&&!s&&(Vt=L(I)),Vt!=S&&Vt!=I||M(i,Vt)}}else Vt=S,M(i,Vt);n===!1&&(Vt=S,M(i,Vt))}}function z(t){var i=t.originalEvent;return E&&i.touches.length>0?(st(),!0):(ht()&&(Ut=Zt),Gt=Ct(),Ht=wt(),H()||!A()?(Vt=S,M(i,Vt)):e.triggerOnTouchEnd||0==e.triggerOnTouchEnd&&Vt===x?(t.preventDefault(),Vt=I,M(i,Vt)):!e.triggerOnTouchEnd&&X()?(Vt=I,D(i,Vt,c)):Vt===x&&(Vt=S,M(i,Vt)),ut(!1),null)}function j(){Ut=0,Gt=0,Qt=0,Wt=0,Pt=0,Bt=1,at(),ut(!1)}function k(t){var i=t.originalEvent;e.triggerOnTouchLeave&&(Vt=L(I),M(i,Vt))}function O(){$t.unbind(jt,g),$t.unbind(Mt,j),$t.unbind(kt,R),$t.unbind(Ot,z),Lt&&$t.unbind(Lt,k),ut(!1)}function L(t){var i=t,n=P(),o=A(),r=H();return!n||r?i=S:!o||t!=x||e.triggerOnTouchEnd&&!e.triggerOnTouchLeave?!o&&t==I&&e.triggerOnTouchLeave&&(i=S):i=I,i}function M(t,e){var i=void 0;return Y()||U()?i=D(t,e,u):(N()||q())&&i!==!1&&(i=D(t,e,d)),ot()&&i!==!1?i=D(t,e,p):rt()&&i!==!1?i=D(t,e,f):nt()&&i!==!1&&(i=D(t,e,c)),e===S&&j(t),e===I&&(E?0==t.touches.length&&j(t):j(t)),i}function D(t,h,l){var g=void 0;if(l==u){if($t.trigger("swipeStatus",[h,At||null,Dt||0,Ht||0,Ut,Yt]),e.swipeStatus&&(g=e.swipeStatus.call($t,t,h,At||null,Dt||0,Ht||0,Ut,Yt),g===!1))return!1;if(h==I&&V()){if($t.trigger("swipe",[At,Dt,Ht,Ut,Yt]),e.swipe&&(g=e.swipe.call($t,t,At,Dt,Ht,Ut,Yt),g===!1))return!1;switch(At){case i:$t.trigger("swipeLeft",[At,Dt,Ht,Ut,Yt]),e.swipeLeft&&(g=e.swipeLeft.call($t,t,At,Dt,Ht,Ut,Yt));break;case n:$t.trigger("swipeRight",[At,Dt,Ht,Ut,Yt]),e.swipeRight&&(g=e.swipeRight.call($t,t,At,Dt,Ht,Ut,Yt));break;case o:$t.trigger("swipeUp",[At,Dt,Ht,Ut,Yt]),e.swipeUp&&(g=e.swipeUp.call($t,t,At,Dt,Ht,Ut,Yt));break;case r:$t.trigger("swipeDown",[At,Dt,Ht,Ut,Yt]),e.swipeDown&&(g=e.swipeDown.call($t,t,At,Dt,Ht,Ut,Yt))}}}if(l==d){if($t.trigger("pinchStatus",[h,qt||null,Ft||0,Ht||0,Ut,Bt,Yt]),e.pinchStatus&&(g=e.pinchStatus.call($t,t,h,qt||null,Ft||0,Ht||0,Ut,Bt,Yt),g===!1))return!1;if(h==I&&F())switch(qt){case s:$t.trigger("pinchIn",[qt||null,Ft||0,Ht||0,Ut,Bt,Yt]),e.pinchIn&&(g=e.pinchIn.call($t,t,qt||null,Ft||0,Ht||0,Ut,Bt,Yt));break;case a:$t.trigger("pinchOut",[qt||null,Ft||0,Ht||0,Ut,Bt,Yt]),e.pinchOut&&(g=e.pinchOut.call($t,t,qt||null,Ft||0,Ht||0,Ut,Bt,Yt))}}return l==c?h!==S&&h!==I||(clearTimeout(Kt),clearTimeout(te),Z()&&!tt()?(Jt=Ct(),Kt=setTimeout($.proxy(function(){Jt=null,$t.trigger("tap",[t.target]),e.tap&&(g=e.tap.call($t,t,t.target))},this),e.doubleTapThreshold)):(Jt=null,$t.trigger("tap",[t.target]),e.tap&&(g=e.tap.call($t,t,t.target)))):l==p?h!==S&&h!==I||(clearTimeout(Kt),Jt=null,$t.trigger("doubletap",[t.target]),e.doubleTap&&(g=e.doubleTap.call($t,t,t.target))):l==f&&(h!==S&&h!==I||(clearTimeout(Kt),Jt=null,$t.trigger("longtap",[t.target]),e.longTap&&(g=e.longTap.call($t,t,t.target)))),g}function A(){var t=!0;return null!==e.threshold&&(t=Dt>=e.threshold),t}function H(){var t=!1;return null!==e.cancelThreshold&&null!==At&&(t=mt(At)-Dt>=e.cancelThreshold),t}function W(){return null===e.pinchThreshold||Ft>=e.pinchThreshold}function P(){var t;return t=!e.maxTimeThreshold||!(Ht>=e.maxTimeThreshold)}function B(t,s){if(e.allowPageScroll===h||q())t.preventDefault();else{var a=e.allowPageScroll===l;switch(s){case i:(e.swipeLeft&&a||!a&&e.allowPageScroll!=m)&&t.preventDefault();break;case n:(e.swipeRight&&a||!a&&e.allowPageScroll!=m)&&t.preventDefault();break;case o:(e.swipeUp&&a||!a&&e.allowPageScroll!=v)&&t.preventDefault();break;case r:(e.swipeDown&&a||!a&&e.allowPageScroll!=v)&&t.preventDefault()}}}function F(){var t=Q(),e=G(),i=W();return t&&e&&i}function q(){return!!(e.pinchStatus||e.pinchIn||e.pinchOut)}function N(){return!(!F()||!q())}function V(){var t=P(),e=A(),i=Q(),n=G(),o=H(),r=!o&&n&&i&&e&&t;return r}function U(){return!!(e.swipe||e.swipeStatus||e.swipeLeft||e.swipeRight||e.swipeUp||e.swipeDown)}function Y(){return!(!V()||!U())}function Q(){return Ut===e.fingers||e.fingers===y||!E}function G(){return 0!==Yt[0].end.x}function X(){return!!e.tap}function Z(){return!!e.doubleTap}function J(){return!!e.longTap}function K(){if(null==Jt)return!1;var t=Ct();return Z()&&t-Jt<=e.doubleTapThreshold}function tt(){return K()}function et(){return(1===Ut||!E)&&(isNaN(Dt)||Dte.longTapThreshold&&Dt=0?i:s<=360&&s>=315?i:s>=135&&s<=225?n:s>45&&s<135?r:o}function Ct(){var t=new Date;return t.getTime()}function Tt(t){t=$(t);var e=t.offset(),i={left:e.left,right:e.left+t.outerWidth(),top:e.top,bottom:e.top+t.outerHeight()};return i}function Rt(t,e){return t.x>e.left&&t.xe.top&&t.y=1?"floor":"ceil"](h/a),u=Math[u>=1?"floor":"ceil"](u/a),d=Math[d>=1?"floor":"ceil"](d/a),l.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();p=t.clientX-v.left,f=t.clientY-v.top}return t.deltaX=u,t.deltaY=d,t.deltaFactor=a,t.offsetX=p,t.offsetY=f,t.deltaMode=0,o.unshift(t,h,u,d),s&&clearTimeout(s),s=setTimeout(e,200),($.event.dispatch||$.event.handle).apply(this,o)}}function e(){a=null}function i(t,e){return l.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice,s,a;if($.event.fixHooks)for(var h=n.length;h;)$.event.fixHooks[n[--h]]=$.event.mouseHooks;var l=$.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t;$.data(this,"mousewheel-line-height",l.getLineHeight(this)),$.data(this,"mousewheel-page-height",l.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null;$.removeData(this,"mousewheel-line-height"),$.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var e=$(t),i=e["offsetParent"in $.fn?"offsetParent":"parent"]();return i.length||(i=$("body")),parseInt(i.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(t){return $(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};$.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||[];return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.enviraImagesLoaded=e(t,t.EvEmitter)}(window,function t(e,i){function n(t,e){for(var i in e)t[i]=e[i];return t}function o(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i